//
//  SynDataCell.m
//  RSW.IOS
//
//  Created by zhaiqiuqiu on 16/12/15.
//  Copyright © 2016年 com.xtion.crm. All rights reserved.
//

#import "SynDataCell.h"

@interface SynDataCell()
{
    
}
@end

@implementation SynDataCell

-(instancetype)init
{
    return [self initWithFrame:CGRectZero];
}

-(id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    CGSize s = [NSString charSizeWithSystemFontSize:16];
    _title = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, s.width*10, s.height)];
    _title.backgroundColor = [UIColor clearColor];
    _title.font = [UIFont systemFontOfSize:16];
    [self.contentView addSubview:_title];
    
    s = [NSString charSizeWithSystemFontSize:13];
    _status = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, s.width*10, s.height)];
    _status.backgroundColor = [UIColor clearColor];
    _status.font = [UIFont systemFontOfSize:13];
    _status.textColor = [UIColor colorWithHex:mcrmSAASUISkinColorTextStyle9b9b9bColor];
    [self.contentView addSubview:_status];
    
    _logoUrl = [[UIImageView alloc]initWithImage:[[UIImage imageNamed:@"img_download.png"] resizeableCenterImage]];

    [self.contentView addSubview:_logoUrl];

    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    _title.origin = CGPointMake(30, self.contentView.centerY - 10);
    _status.origin = CGPointMake(30, self.contentView.centerY + 10);
    
    _logoUrl.right = self.contentView.right - 13;
    _logoUrl.centerY = self.contentView.centerY;
}

@end
